Skip to content

Conversation

@vitorrm
Copy link
Contributor

@vitorrm vitorrm commented Jun 3, 2025

Pull Request Description for dash_navigate Skin Parameter Feature

Title

Add skin parameter to dash_navigate function for dynamic theme switching

Description

This PR adds a new optional skin parameter to the dash_navigate function, allowing users to change dashboard skins/themes during navigation.

What this PR accomplishes:

  • Extends the dash_navigate function to accept and process a skin parameter
  • Maintains backward compatibility with existing code (parameter is optional)
  • Tiny refactor on the update_dash function for better handling of the query params
  • I've tried to avoid any new features from JS as I think this project tries to keep compatibility with older browsers (my own case - IPad 3)

Use case:

  • Implementing power-saving modes for dashboards (switching to a dark theme when a room is vacant)

Example usage:

# Switch to a dashboard with a specific skin
self.dash_navigate("main_dashboard", skin="dark")

# Standard usage without skin parameter still works
self.dash_navigate("settings_dashboard")

Testing:

I've tested this functionality and verified that the skin parameter correctly applies the specified theme during navigation while preserving all existing functionality.

Closes #2345

@acockburn
Copy link
Member

Thanks - this looks good, but I'd like to hold it back of r a little while until we get through all the bugs introduced in 4.5. I'll merge it when things have calmed down a little.

@vitorrm
Copy link
Contributor Author

vitorrm commented Jun 4, 2025

That is fine for me, totally get it

@acockburn acockburn merged commit 5705c80 into AppDaemon:dev Jun 7, 2025
8 checks passed
@acockburn
Copy link
Member

OK, this will be in 4.5.11, thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add "skin" Parameter to dash_navigate Function

2 participants